package com.example.demo.service.impl;

import com.example.demo.mapper.DetectionMapper;
import com.example.demo.mapper.UserMapper;
import com.example.demo.pojo.Detection;
import com.example.demo.pojo.request.DetectionRequest;
import com.example.demo.pojo.vo.LoginVo;
import com.example.demo.service.DetectionService;
import com.example.demo.service.UserService;
import org.apache.ibatis.reflection.DefaultReflectorFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 程序员小洋
 * @version 2022.3
 * @date 2023/5/9 09:16
 * @title 检测表的业务实现类
 */
@SuppressWarnings("all")
@Service
public class DetectionServiceImpl implements DetectionService {

    @Autowired
    private DetectionMapper detectionMapper;

    /**
     * 新增
     * @param detection
     * @return
     */
    @Override
    public void save(Detection detection) {
        detectionMapper.save(detection);
    }

    /**
     * 修改
     * @param detection
     * @return
     */
    @Override
    public void update(Detection detection) {
        detectionMapper.update(detection);
    }

    /**
     * 根据id删除
     * @param id
     */
    @Override
    public void deleteById(Integer id) {
        detectionMapper.deleteById(id);
    }

    /**
     * 根据id查询
     * @param id
     * @return
     */
    @Override
    public Detection getById(Integer id) {
        return detectionMapper.getById(id);
    }

    /**
     * 条件查询
     * @return
     */
    @Override
    public List<Detection> list(DetectionRequest detectionRequest) {
        return detectionMapper.list(detectionRequest);
    }


}
